<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
        <base href="<%=basePath%>">
        <meta charset="UTF-8">
        <title>拉勾网-最专业的互联网招聘平台</title>
        <link href="style/images/favicon.ico" rel="Shortcut Icon"> <!--标签图标-->
        
        <link href="style/css/style.css" type="text/css" rel="stylesheet">
        <link href="style/css/external.min.css" type="text/css" rel="stylesheet">
        <link href="style/css/popup.css" type="text/css" rel="stylesheet">
        <script type="text/javascript" src="style/js/jquery.1.10.1.min.js"></script>
<!-- css样式 -->
<style type="text/css">  
   .div1Box { 
      padding-top: 10px;
      padding-left: 5px;
    }
    .loginBox {
     width: 700px; 
     background-color: white; 
     box-shadow: 0px 0px 13px -2px rgba(135,130,135,1); 
     border-radius: 8px; 
     padding: 15px;
   }
   #loginBoxbottom {
    width: 100%;
    height:40%;
   }
   #mima{
   margin-top: 30px;
   }      
</style> 
<!-- ajax代码 开始 -->
  <script type="text/javascript">
  var httpRequest = null;
     function checkmima(oval) {
    	  var email = $('#email').val();
        	  if (oval == "") {//判断数据是否为空，为空就没有必要查数据库了
      			return;
      		  }
        	  
        	  var str=JSON.stringify({
       		   "mima":oval,
       		   "bemail": email
       	  });
        	  $.post("DomodifyServlet2",{str:str},function(data){  
        		$('#s1').html(data);
        		if("密码正确"==data){
        			document.getElementById("save").disabled=false;
        		}else{
        			document.getElementById("save").disabled=true;
        		};
        		
        	  });	  
      } 

      function tijiao() {
    	  var email = $('#email').val();
    	  var newpassword = $('#newpassword').val();
    	  var comfirmpassword = $('#comfirmpassword').val();
    	  
    	  if(newpassword != comfirmpassword){
    		  $('#s2').html("密码不一致");
    		  return;
    	  }
    	  
    	  var str=JSON.stringify({
      		   "newpassword":newpassword,
      		   "bemail": email
      	  });
    	  
       	  $.post("DoGeRenmimaServlet",{str:str},function(data){  
       		$('#s2').html(data);
       	  });
      }
  </script>
<!-- ajax代码 结束 -->
</head>
<body>
    <div id="body">
	      <!-- 开始 top -->
	        <jsp:include page="gerentop.jsp"></jsp:include>
          <!-- 结束 top -->   
    <div id="container">
<!-- ===============================================	 -->
	<!--开始  左边栏-->	
       <div class="user_bindSidebar">
           <dl id="user_sideBarmenu" class="user_sideBarmenu">
     	        <dt><h3>帐号设置</h3></dt>
               <%--  <dd><a href="TogetcompanyServlet?edithomepage=2&cid=${cid}">帐号信息</a></dd> --%>
                <dd><a href="TogetcompanyServlet?edithomepage=3&cid=${cid}">修改密码</a></dd>
            </dl>
       </div>
    <!--结束  左边栏-->	       
        <div class="content user_modifyContent">
             <dl class="c_section">
                  <dt>
            	      <h2><em></em>修改密码</h2>
                  </dt>
                  <div class="div1Box" >
                      <div class="loginBox">
                        <dd>
            	        <form id="updatePswForm">
            	          <div id="mima">
            		          <table class="savePassword">
            			        
            			     	   <tr>
            				          <td>登录邮箱</td>
            				          <td class="c7">${user.getUemail()}</td>
            			          </tr>
            			          <tr>
            				         <td class="label">当前密码</td>
            				         <td>
            				             <input type="hidden" id="email" value="${user.getUemail()}"/>
            					         <input type="password" maxlength="16" id="oldpassword" name="oldpassword" style="background-image: url(style/images/img/0CQnd2Jos49xUAAAAASUVORK5CYII=quot); background-repeat: no-repeat; background-attachment: scroll; background-position: right center;" value="" onblur="checkmima(this.value)"/>
            					         <span id="s1"></span>
            				         </td>            				
            			         </tr>
            			         <tr>
            				         <td class="label">新密码 </td>
            				         <td><input type="password" maxlength="16" id="newpassword" name="newpassword" style="background-image: url(style/images/img/a6y3y0Wx5kbFHvGuXzkgf0xhKnPzA4UTyaTB8Ph8AvcHi3fnsrZ7Wore02YViqVOrRXXPhfqP8j6MYlawoAAAAASUVORK5CYII=quot); background-repeat: no-repeat; background-attachment: scroll; background-position: right center;"/></td>
            			         </tr>
            			         <tr>
            				         <td class="label">确认密码</td>
            				         <td>
            				            <input type="password" maxlength="16" id="comfirmpassword" name="comfirmpassword" style="background-image: url(style/images/img/a6y3y0Wx5kbFHvGuXzkgf0xhKnPzA4UTyaTB8Ph8AvcHi3fnsrZ7Wore02YViqVOrRXXPhfqP8j6MYlawoAAAAASUVORK5CYII=quot); background-repeat: no-repeat; background-attachment: scroll; background-position: right center;"/>
            				            <span id="s2"></span>
            				         </td>
            			         </tr>
            			         <tr>
            				         <td>&nbsp;</td>
            				             <td><input type="button" id="save" value="保 存"  onclick="tijiao()"></td>
            				        
            			         </tr>
            		         
            		      </table>
            		      </div>
				       </form>
		               </dd>
                      <div id="loginBoxbottom"></div> 
                      </div> 
                  </div>  
            </dl>
    </div>	       
<!-- ===============================================	 -->	       
		       <!-- 开始  返回顶部 -->
		       <div class="clear"></div>
               <a rel="nofollow" title="回到顶部" id="backtop"></a>
               <script src="style/js/core.min.js" type="text/javascript"></script>
               <!-- 结束  返回顶部 -->
   </div>
	 </div>    
	 <!-- 开始 底部 -->	
		<div id="footer">
		<div class="wrapper">
			<a rel="nofollow" target="_blank" href="about.html">联系我们</a>
		    <a target="_blank" href="http://www.lagou.com/af/zhaopin.html">互联网公司导航</a>
		    <a rel="nofollow" target="_blank" href="http://e.weibo.com/lagou720">拉勾微博</a>
		    <a rel="nofollow" href="javascript:void(0)" class="footer_qr">拉勾微信<i></i></a>
			<div class="copyright">&copy;2013-2014 Lagou <a href="http://www.miitbeian.gov.cn/state/outPortal/loginPortal.action" target="_blank">京ICP备14023790号-2</a></div>
		</div>
	</div>
	 <!-- 结束 底部 -->
  </body>
</html>
